Correctly read diff and terr from geo format.
authorRobert Lipe <robertlipe@users.noreply.github.com>
Sun, 15 Oct 2017 02:59:24 +0000 (21:59 -0500)
committerGitHub <noreply@github.com>
Sun, 15 Oct 2017 02:59:24 +0000 (21:59 -0500)
Thank you, Rick Richardson.

geo.cc

diff --git a/geo.cc b/geo.cc
index 5c785f3814c4a6ad89f7a3053280c5fd43eb6db2..e6f4560a0daccb4d4a4366cd67f8ca6f8f544e02 100644 (file)
--- a/geo.cc
+++ b/geo.cc
@@ -74,9 +74,9 @@ void GeoReadLoc()
         waypt_add_url(wpt,
                       reader.readElementText(), a.value("text").toString());
       } else if (current_tag == "/loc/waypoint/difficulty") {
-        wpt->gc_data->diff = reader.readElementText().toInt() * 10;
+        wpt->gc_data->diff = reader.readElementText().toDouble() * 10;
       } else if (current_tag == "/loc/waypoint/terrain") {
-        wpt->gc_data->terr = reader.readElementText().toInt() * 10;
+        wpt->gc_data->terr = reader.readElementText().toDouble() * 10;
       } else if (current_tag == "/loc/waypoint/container") {
         wpt->gc_data->container = wpt_container(reader.readElementText());
       }